import { createRouter, createWebHashHistory } from "vue-router";
// import HomeView from "@/views/HomeView.vue";
import DashboardView from "@/views/DashboardView.vue";
import ArticleView from "@/views/ArticleView.vue";
import PageView from "@/views/PageView.vue";
import CommentView from "@/views/CommentView.vue";
import FileView from "@/views/FileView.vue";
import LinkView from "@/views/LinkView.vue";
import MenuView from "@/views/MenuView.vue";
import CharacterView from "@/views/CharacterView.vue";
import UserView from "@/views/UserView.vue";
import SettingView from "@/views/SettingView.vue";
import AboutView from "@/views/AboutView.vue";

const router = createRouter({
  history: createWebHashHistory(),
  routes: [
    {
      path: "/",
      name: "主页",
      // component: HomeView,
      redirect: "/dashboard",
    },
    {
      path: "/dashboard",
      name: "仪表盘",
      component: DashboardView,
    },
    {
      path: "/article",
      name: "文章",
      component: ArticleView,
    },
    {
      path: "/page",
      name: "页面",
      component: PageView,
    },
    {
      path: "/comment",
      name: "评论",
      component: CommentView,
    },
    {
      path: "/file",
      name: "附件",
      component: FileView,
    },
    {
      path: "/link",
      name: "友链",
      component: LinkView,
    },
    {
      path: "/menu",
      name: "菜单",
      component: MenuView,
    },
    {
      path: "/character",
      name: "角色",
      component: CharacterView,
    },
    {
      path: "/user",
      name: "用户",
      component: UserView,
    },
    {
      path: "/setting",
      name: "设置",
      component: SettingView,
    },
    {
      path: "/about",
      name: "关于",
      // route level code-splitting
      // this generates a separate chunk (About.[hash].js) for this route
      // which is lazy-loaded when the route is visited.
      component: AboutView,
    },
  ],
});

export default router;
